package com.ucs.restlet.firstres;

import com.thoughtworks.xstream.XStream;
import com.thoughtworks.xstream.io.xml.DomDriver;

public class XStremUtil {
    public static String toXML(Object o) throws Exception{
        XStream xstream = new XStream(new DomDriver());
        return xstream.toXML(o);
	}
	public static Object toJava(String xml) throws Exception{
        XStream xstream = new XStream(new DomDriver());
        return xstream.fromXML(xml);
}
}
